package com.gz.DroidPong.Constants;

import org.anddev.andengine.engine.Engine;

import android.util.Log;

import com.gz.DroidPong.DroidPongActivity;

public class UIManager {
	private static float mScreenWidth = 480;
	private static float mScreenHeight = 320;
	private static DroidPongActivity mGame;
	private static String mLoadState = "";
	private static TextureManager mTextures;
	private static float mBallSize = 50;
	
	public static DroidPongActivity GetGame(){
		return mGame;
	}
	
	public static void setActivity(DroidPongActivity pGame, float pWidth, float pHeight){
		mGame = pGame;
		mScreenHeight = pHeight;
		mScreenWidth = pWidth;
		
		if(mScreenHeight > mScreenWidth)
		{
			mBallSize = mScreenHeight/22;
		}
		else
		{
			mBallSize = mScreenWidth/22;
		}
		
		OptionsManager.GetDefaults();
	}
	
	public static float getWidth(){
		return mScreenWidth;
	}
	
	public static float getHeight(){
		return mScreenHeight;
	}

	public static float getBallSize(){
		return mBallSize;
	}
	
	public static void setLoadState(String msg){
		mLoadState = msg;
	}
	
	public static String getLoadState(){
		return mLoadState;
	}
	
	public static TextureManager getTextures(){
		return mTextures;
	}
	
	public static void LoadTextures(Engine pEngine){
		mTextures = new TextureManager(pEngine);
	}
	
	
	
	
	
	private static void log(String msg){
		Log.d("UI", msg);
	}
}
